Engineering a Sort Function

نویسندگان

  • Jon Louis Bentley
  • M. Douglas McIlroy
چکیده

We recount the history of a new qsort function for a C library. Our function is clearer, faster and more robust than existing sorts. It chooses partitioning elements by a new sampling scheme; it partitions by a novel solution to Dijkstra’s Dutch National Flag problem; and it swaps efficiently. Its behavior was assessed with timing and debugging testbeds, and with a program to certify performance. The design techniques apply in domains beyond sorting.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Particle swarm optimisation with stochastic ranking for constrained numerical and engineering benchmark problems

Most of the real world science and engineering optimisation problems are non-linear and constrained. This paper presents a hybrid algorithm by integrating particle swarm optimisation with stochastic ranking for solving standard constrained numerical and engineering benchmark problems. Stochastic ranking technique that uses bubble sort mechanism for ranking the solutions and maintains a balance ...

متن کامل

Modelling Inheritance in an Algebraic Speci cation Language

This paper points at the retract problem that arises when using subsorting in a not necessarily executable algebraic speci cation language We show how this problem can be circumvented in many important cases by the use of con ditionally polymorphic functions Further we will see that this sorting facility is well suited to model inheritance in a smart way We give a simple example which demonstra...

متن کامل

A Multi-objective Mixed Model Two-sided Assembly Line Sequencing Problem in a Make –To- Order Environment with Customer Order Prioritization

Mixed model two-sided assembly lines (MM2SAL) are applied to assemble large product models, which is produced in high-volume. So, the sequence planning of products to reduce cost and increase productivity in this kind of lines is imperative. The presented problem is tackled in two steps. In step 1, a framework is developed to select and prioritize customer orders under the finite capacity of th...

متن کامل

Solving Engineering Optimization Problems with the Simple Constrained Particle Swarm Optimizer

This paper introduces a particle swarm optimization algorithm to solve constrained engineering optimization problems. The proposed approach uses a relatively simple method to handle constraints and a different mechanism to update the velocity and position of each particle. The algorithm is validated using four standard engineering design problems reported in the specialized literature and it is...

متن کامل

A new trust-region algorithm based on radial basis function interpolation

Optimization using radial basis functions as an interpolation tool in trust-region (ORBIT), is a derivative-free framework based on fully linear models to solve unconstrained local optimization, especially when the function evaluations are computationally expensive. This algorithm stores the interpolation points and function values to using at subsequent iterations. Despite the comparatively ad...

متن کامل

Prioritization of historic buildings based on their values

Iran is located in a high-risk seismic zone of earthquakes. It has thousands of valuable historic buildings, mostly made of unreinforced masonry, which is quite vulnerable to natural hazards, especially earthquakes. The conservation and seismic upgrading of these buildings is vital for their survival. However, resources are limited and some sort of prioritization is needed in order to alloca...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:
  • Softw., Pract. Exper.

دوره 23  شماره 

صفحات  -

تاریخ انتشار 1993